import 'package:flutter/cupertino.dart';

class MyNavigatorObservers extends NavigatorObserver {
  @override
  void didPop(Route route, Route previousRoute) {
    // TODO: implement didPop
    // print("didPop route settings is" + route.settings.toString());
    // print("didPop route settings is" + route.settings.name.toString());
    // print("didPop route previousRoute is" + previousRoute.settings.toString());
    // print("didPop route previousRoute is" +
    //     previousRoute.settings.name.toString());
    super.didPop(route, previousRoute);
  }

  @override
  void didPush(Route route, Route previousRoute) {
    // TODO: implement didPush
    // print("didPush route settings is" + route.settings.toString());
    // print("didPush route settings is" + route.settings.name.toString());
    // if (previousRoute != null) {
    //   print(
    //       "didPush route previousRoute is" + previousRoute.settings.toString());
    //   print("didPush route previousRoute is" +
    //       previousRoute.settings.name.toString());
    // }

    super.didPush(route, previousRoute);
  }

  @override
  void didRemove(Route route, Route previousRoute) {
    // TODO: implement didRemove
    // print(" route settings is" + route.settings.toString());
    // print("didRemove route settings is" + route.settings.name.toString());
    // if (previousRoute != null) {
    //   print("didRemove route previousRoute is" +
    //       previousRoute.settings.toString());
    //   print("didRemove route previousRoute is" +
    //       previousRoute.settings.name.toString());
    // }
    super.didRemove(route, previousRoute);
  }
}
